package pers.mihao.quickstream.common.util.scan.filter;

import java.lang.annotation.Annotation;

/**
 * @author mihao
 * @since 2022/7/19
 */
public class AnnotationScanFilter implements ScanClassFilter{

    Class<? extends Annotation> annotation;

    public AnnotationScanFilter(Class<? extends Annotation> annotation) {
        this.annotation = annotation;
    }

    @Override
    public boolean isNotMatch(Class<?> clazz) {
        if (clazz.getAnnotation(annotation) == null) {
            return true;
        }
        return false;
    }
}
